﻿using System;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
using BtcPay.Properties;

namespace BtcPay
{
    [DefaultEvent("Click")]
    public class BtcPayButton : PictureBox
    {
        Image hover;

        public BtcPayButton()
        {
            Image = Resources.btc_normal;
            hover = Resources.btc_hover;

            Size = Image.Size;
        }

        [Category("Bitcoin")]
        public string Address { get; set; }

        [Category("Bitcoin")]
        public string Label { get; set; }

        [Category("Bitcoin")]
        public string Amount { get; set; }

        [Category("Bitcoin")]
        public string Message { get; set; }

        protected override void OnMouseEnter(EventArgs e)
        {
            Cursor = Cursors.Hand;
            Image = hover;

            base.OnMouseEnter(e);
        }

        protected override void OnMouseLeave(EventArgs e)
        {
            Image = Resources.btc_normal;
            base.OnMouseLeave(e);
        }

        protected override void OnMouseClick(MouseEventArgs e)
        {
            Image = hover;

            base.OnMouseClick(e);
        }
    }
}